package com.hc.server.db;

// Generated 2011-12-25 17:23:27 by Hibernate Tools 3.4.0.CR1

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;

/**
 * Ordermap generated by hbm2java
 */
@Entity
@Table(name = "ordermap", catalog = "mpi", uniqueConstraints = @UniqueConstraint(columnNames = "mallorderId"))
public class Ordermap implements java.io.Serializable {

	private Integer id;
	private Mporder mporder;
	private String mallorderId;

	public Ordermap() {
	}

	public Ordermap(Mporder mporder, String mallorderId) {
		this.mporder = mporder;
		this.mallorderId = mallorderId;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "orderId", nullable = false)
	public Mporder getMporder() {
		return this.mporder;
	}

	public void setMporder(Mporder mporder) {
		this.mporder = mporder;
	}

	@Column(name = "mallorderId", unique = true, nullable = false, length = 45)
	public String getMallorderId() {
		return this.mallorderId;
	}

	public void setMallorderId(String mallorderId) {
		this.mallorderId = mallorderId;
	}

}
